package com.iotechn.unimall.admin.api.purchaseOrder;

import com.iotechn.unimall.core.annotation.HttpMethod;
import com.iotechn.unimall.core.annotation.HttpOpenApi;
import com.iotechn.unimall.core.annotation.HttpParam;
import com.iotechn.unimall.core.annotation.HttpParamType;
import com.iotechn.unimall.core.annotation.param.NotNull;
import com.iotechn.unimall.core.exception.ServiceException;
import com.iotechn.unimall.data.domain.PurchaseOrderGoodsDO;
import com.iotechn.unimall.data.model.Page;

import java.util.List;
import java.util.Map;

/**
 * 
 *
 * @author hct
 * @email 77802226@qq.com
 * @date 2021-04-01 10:58:13
 */
@HttpOpenApi(group = "admin.purchaseOrderGoods", description = "")
public interface PurchaseOrderGoodsService{

    @HttpMethod(description = "列表", permission = "list", permissionParentName = "管理", permissionName = "列表")
    public Page<PurchaseOrderGoodsDO> list(
            @HttpParam(name = "pageNo", type = HttpParamType.COMMON, description = "页码", valueDef = "1") Integer page,
            @HttpParam(name = "limit", type = HttpParamType.COMMON, description = "页长度", valueDef = "20") Integer limit,
            @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员ID") Long adminId) throws ServiceException;

    @HttpMethod(description = "创建", permission = "purchase:purchaseordergoods:create", permissionParentName = "管理", permissionName = "创建")
    public PurchaseOrderGoodsDO create(
            @NotNull @HttpParam(name = "purchaseOrderGoodsDO", type = HttpParamType.COMMON, description = "") PurchaseOrderGoodsDO purchaseOrderGoodsDO,
            @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员ID") Long adminId) throws ServiceException;

    @HttpMethod(description = "修改", permission = "purchase:purchaseordergoods:update", permissionParentName = "管理", permissionName = "修改")
    public String update(
            @NotNull @HttpParam(name = "purchaseOrderGoodsDO", type = HttpParamType.COMMON, description = "") PurchaseOrderGoodsDO purchaseOrderGoodsDO,
            @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员ID") Long adminId) throws ServiceException;

    @HttpMethod(description = "删除", permission = "purchase:purchaseordergoods:delete", permissionParentName = "管理", permissionName = "删除")
    public String delete(
            @NotNull @HttpParam(name = "id", type = HttpParamType.COMMON, description = "删除Id") Long id,
            @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员ID") Long adminId) throws ServiceException;

    @HttpMethod(description = "详情", permission = "purchase:purchaseordergoods:detail", permissionParentName = "管理", permissionName = "详情")
    public PurchaseOrderGoodsDO detail(
            @NotNull @HttpParam(name = "id", type = HttpParamType.COMMON, description = "Id") Long id,
            @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员ID") Long adminId) throws ServiceException;

    @HttpMethod(description = "查询仓库商品")
    public Page querySkusByWarehouseId(@HttpParam(name = "pageNo", description = "页码", valueDef = "1") Integer page,
                                       @HttpParam(name = "limit", description = "页长度", valueDef = "20") Integer limit, @HttpParam(name = "warehouseId", description = "仓库id") Long warehouseId,
                                       @HttpParam(name = "skuIds", description = "分类Id") String skuIds,@HttpParam(name="search") String search);
    @HttpMethod(description = "列出采购单所有商品")
    public List<Map<String,Object>> listWarehouseSkusByPara(@HttpParam(name = "pOrderId", description = "采购单Id") Long pOrderId)throws ServiceException;

   }

